﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  >

    <SolidColorBrush x:Key="TitleBackground"  Color="#FC128FC4"/>
    <SolidColorBrush x:Key="CommonForeground" Color="White"/>
    <SolidColorBrush x:Key="RightAreaBackground" Color="#2DFFFFFF"/>
    <Style x:Key="TextBlockStyle" TargetType="TextBlock">
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="FontFamily" Value="STZhongsong"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="Foreground" Value="{StaticResource CommonForeground}"/>
    </Style>

    <Style x:Key="BaseStyle" TargetType="Control">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="FontSize" Value="36"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Width" Value="48"/>
        <Setter Property="Height" Value="48"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Foreground" Value="{StaticResource CommonForeground}"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="Padding" Value="0"/>
    </Style>
    
    <Style x:Key="CommandButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource BaseStyle}">
        <Setter Property="Margin" Value="5,3"/>
        <Setter Property="FontFamily" Value="Webdings"/>
        <Setter Property="Foreground" Value="White"/>
      	<Setter Property="Template">
      		<Setter.Value>
      			<ControlTemplate TargetType="{x:Type ButtonBase}">
      				<ControlTemplate.Resources>
      					<Storyboard x:Key="OnMouseEnter1">
      						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
      							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.3"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
      						</DoubleAnimationUsingKeyFrames>
      						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
      							<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.3"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
      						</DoubleAnimationUsingKeyFrames>
      						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
      							<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0.4"/>
      							<SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
      						</DoubleAnimationUsingKeyFrames>
      					</Storyboard>
      				</ControlTemplate.Resources>
      				<Border RenderTransformOrigin="0.5,0.5" x:Name="border" Width="Auto" Height="Auto" BorderBrush="{x:Null}" BorderThickness="5,5,5,5" CornerRadius="4,4,4,4" Background="{x:Null}">
      					<Border.RenderTransform>
      						<TransformGroup>
      							<ScaleTransform ScaleX="1" ScaleY="1"/>
      							<SkewTransform AngleX="0" AngleY="0"/>
      							<RotateTransform Angle="0"/>
      							<TranslateTransform X="0" Y="0"/>
      						</TransformGroup>
      					</Border.RenderTransform>
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
      				</Border>
      				<ControlTemplate.Triggers>
      					<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="border">
      						<BeginStoryboard Storyboard="{StaticResource OnMouseEnter1}"/>
      					</EventTrigger>
      					<Trigger Property="IsKeyboardFocused" Value="True"/>
      					<Trigger Property="Button.IsDefaulted" Value="True"/>
      					<Trigger Property="IsPressed" Value="True"/>
      					<Trigger Property="ToggleButton.IsChecked" Value="True"/>
      					<Trigger Property="IsEnabled" Value="False">
      						<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
      					</Trigger>
      				</ControlTemplate.Triggers>
      			</ControlTemplate>
      		</Setter.Value>
      	</Setter>
    </Style>

    <Style x:Key="ModeRadioButtonStyle" TargetType="{x:Type RadioButton}" BasedOn="{StaticResource BaseStyle}">
        <!--<Setter Property="Background" Value="Gray"/>-->
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RadioButton}">
                    <Grid  Background="{TemplateBinding Background}">
                        <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="Silver"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="Background" Value="OrangeRed"/>
                        </Trigger>
                        <Trigger Property="IsChecked" Value="True">
                            <Setter Property="Background" Value="Orange"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
  